{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "import h5py\n",
    "import numpy as np\n",
    "import cartopy.crs as ccrs\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from utils import transform_coord\n",
    "from utils import make_grid\n",
    "from utils import mad_std\n",
    "from utils import spatial_filter\n",
    "from utils import interp2d\n",
    "from utils import tiffread\n",
    "from utils import binning\n",
    "from scipy.ndimage.filters import generic_filter\n",
    "import re\n",
    "import pyproj"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "datapath='/home/jovyan/shared/surface_velocity/FIS_ATL06_small/processed_ATL06_20191129105346_09700511_003_01.h5'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/                        Group\n",
      "/METADATA                Group\n",
      "/METADATA/AcquisitionInformation Group\n",
      "/METADATA/AcquisitionInformation/lidar Group\n",
      "/METADATA/AcquisitionInformation/lidarDocument Group\n",
      "/METADATA/AcquisitionInformation/platform Group\n",
      "/METADATA/AcquisitionInformation/platformDocument Group\n",
      "/METADATA/DataQuality    Group\n",
      "/METADATA/DataQuality/CompletenessOmission Group\n",
      "/METADATA/DataQuality/DomainConsistency Group\n",
      "/METADATA/DatasetIdentification Group\n",
      "/METADATA/Extent         Group\n",
      "/METADATA/Lineage        Group\n",
      "/METADATA/Lineage/ANC06-01 Group\n",
      "/METADATA/Lineage/ANC06-02 Group\n",
      "/METADATA/Lineage/ANC06-03 Group\n",
      "/METADATA/Lineage/ANC17  Group\n",
      "/METADATA/Lineage/ANC19  Group\n",
      "/METADATA/Lineage/ANC25-06 Group\n",
      "/METADATA/Lineage/ANC26-06 Group\n",
      "/METADATA/Lineage/ANC28  Group\n",
      "/METADATA/Lineage/ANC36-06 Group\n",
      "/METADATA/Lineage/ANC38-06 Group\n",
      "/METADATA/Lineage/ATL03  Group\n",
      "/METADATA/Lineage/ATL09  Group\n",
      "/METADATA/Lineage/Control Group\n",
      "/METADATA/ProcessStep    Group\n",
      "/METADATA/ProcessStep/Browse Group\n",
      "/METADATA/ProcessStep/Metadata Group\n",
      "/METADATA/ProcessStep/PGE Group\n",
      "/METADATA/ProcessStep/QA Group\n",
      "/METADATA/ProductSpecificationDocument Group\n",
      "/METADATA/QADatasetIdentification Group\n",
      "/METADATA/SeriesIdentification Group\n",
      "/ancillary_data          Group\n",
      "/ancillary_data/atlas_sdp_gps_epoch Dataset {1}\n",
      "/ancillary_data/control  Dataset {1}\n",
      "/ancillary_data/data_end_utc Dataset {1}\n",
      "/ancillary_data/data_start_utc Dataset {1}\n",
      "/ancillary_data/end_cycle Dataset {1}\n",
      "/ancillary_data/end_delta_time Dataset {1}\n",
      "/ancillary_data/end_geoseg Dataset {1}\n",
      "/ancillary_data/end_gpssow Dataset {1}\n",
      "/ancillary_data/end_gpsweek Dataset {1}\n",
      "/ancillary_data/end_orbit Dataset {1}\n",
      "/ancillary_data/end_region Dataset {1}\n",
      "/ancillary_data/end_rgt  Dataset {1}\n",
      "/ancillary_data/granule_end_utc Dataset {1}\n",
      "/ancillary_data/granule_start_utc Dataset {1}\n",
      "/ancillary_data/land_ice Group\n",
      "/ancillary_data/land_ice/dt_hist Dataset {1}\n",
      "/ancillary_data/land_ice/fit_maxiter Dataset {1}\n",
      "/ancillary_data/land_ice/fpb_maxiter Dataset {1}\n",
      "/ancillary_data/land_ice/max_res_ids Dataset {1}\n",
      "/ancillary_data/land_ice/maxiter Dataset {1}\n",
      "/ancillary_data/land_ice/min_dist Dataset {1}\n",
      "/ancillary_data/land_ice/min_gain_th Dataset {1}\n",
      "/ancillary_data/land_ice/min_n_pe Dataset {1}\n",
      "/ancillary_data/land_ice/min_n_sel Dataset {1}\n",
      "/ancillary_data/land_ice/min_signal_conf Dataset {1}\n",
      "/ancillary_data/land_ice/n_hist Dataset {1}\n",
      "/ancillary_data/land_ice/n_sigmas Dataset {1}\n",
      "/ancillary_data/land_ice/nhist_bins Dataset {1}\n",
      "/ancillary_data/land_ice/proc_interval Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_bsc Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_hrs Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_hsigma Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_msw Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_snr Dataset {1}\n",
      "/ancillary_data/land_ice/qs_lim_sss Dataset {1}\n",
      "/ancillary_data/land_ice/rbin_width Dataset {1}\n",
      "/ancillary_data/land_ice/sigma_beam Dataset {1}\n",
      "/ancillary_data/land_ice/sigma_tx Dataset {1}\n",
      "/ancillary_data/land_ice/t_dead Dataset {1}\n",
      "/ancillary_data/qa_at_interval Dataset {1}\n",
      "/ancillary_data/release  Dataset {1}\n",
      "/ancillary_data/start_cycle Dataset {1}\n",
      "/ancillary_data/start_delta_time Dataset {1}\n",
      "/ancillary_data/start_geoseg Dataset {1}\n",
      "/ancillary_data/start_gpssow Dataset {1}\n",
      "/ancillary_data/start_gpsweek Dataset {1}\n",
      "/ancillary_data/start_orbit Dataset {1}\n",
      "/ancillary_data/start_region Dataset {1}\n",
      "/ancillary_data/start_rgt Dataset {1}\n",
      "/ancillary_data/version  Dataset {1}\n",
      "/gt1l                    Group\n",
      "/gt1l/land_ice_segments  Group\n",
      "/gt1l/land_ice_segments/atl06_quality_summary Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction Group\n",
      "/gt1l/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/fpb_med_corr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/fpb_n_corr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/med_r_fit Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/tx_mean_corr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/bias_correction/tx_med_corr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/delta_time Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/dem Group\n",
      "/gt1l/land_ice_segments/dem/dem_flag Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/dem/dem_h Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/dem/geoid_h Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics Group\n",
      "/gt1l/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/h_expected_rms Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/h_mean Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/n_fit_photons Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/signal_selection_source Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/snr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/snr_significance Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical Group\n",
      "/gt1l/land_ice_segments/geophysical/bckgrd Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/bsnow_conf Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/bsnow_h Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/bsnow_od Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/cloud_flg_asr Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/cloud_flg_atm Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/dac Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/e_bckgrd Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/layer_flag Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/msw_flag Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/neutat_delay_total Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/r_eff Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/solar_azimuth Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/solar_elevation Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/tide_earth Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/tide_equilibrium Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/tide_load Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/tide_ocean Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/geophysical/tide_pole Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track Group\n",
      "/gt1l/land_ice_segments/ground_track/ref_azimuth Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/ref_coelv Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/seg_azimuth Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/sigma_geo_at Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/sigma_geo_r Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/sigma_geo_xt Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/x_atc Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/ground_track/y_atc Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/h_li Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/h_li_sigma Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/latitude Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/longitude Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/segment_id Dataset {5678/Inf}\n",
      "/gt1l/land_ice_segments/sigma_geo_h Dataset {5678/Inf}\n",
      "/gt1l/residual_histogram Group\n",
      "/gt1l/residual_histogram/bckgrd_per_m Dataset {567/Inf}\n",
      "/gt1l/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt1l/residual_histogram/count Dataset {567/Inf, 748}\n",
      "/gt1l/residual_histogram/delta_time Dataset {567/Inf}\n",
      "/gt1l/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt1l/residual_histogram/lat_mean Dataset {567/Inf}\n",
      "/gt1l/residual_histogram/lon_mean Dataset {567/Inf}\n",
      "/gt1l/residual_histogram/pulse_count Dataset {567/Inf}\n",
      "/gt1l/residual_histogram/segment_id_list Dataset {567/Inf, 10}\n",
      "/gt1l/residual_histogram/x_atc_mean Dataset {567/Inf}\n",
      "/gt1l/segment_quality    Group\n",
      "/gt1l/segment_quality/delta_time Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/record_number Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/reference_pt_lat Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/reference_pt_lon Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/segment_id Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/signal_selection_source Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/signal_selection_status Group\n",
      "/gt1l/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5678/Inf}\n",
      "/gt1l/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5678/Inf}\n",
      "/gt1r                    Group\n",
      "/gt1r/land_ice_segments  Group\n",
      "/gt1r/land_ice_segments/atl06_quality_summary Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction Group\n",
      "/gt1r/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/fpb_med_corr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/fpb_n_corr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/med_r_fit Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/tx_mean_corr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/bias_correction/tx_med_corr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/delta_time Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/dem Group\n",
      "/gt1r/land_ice_segments/dem/dem_flag Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/dem/dem_h Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/dem/geoid_h Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics Group\n",
      "/gt1r/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/h_expected_rms Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/h_mean Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/n_fit_photons Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/signal_selection_source Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/snr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/snr_significance Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical Group\n",
      "/gt1r/land_ice_segments/geophysical/bckgrd Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/bsnow_conf Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/bsnow_h Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/bsnow_od Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/cloud_flg_asr Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/cloud_flg_atm Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/dac Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/e_bckgrd Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/layer_flag Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/msw_flag Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/neutat_delay_total Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/r_eff Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/solar_azimuth Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/solar_elevation Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/tide_earth Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/tide_equilibrium Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/tide_load Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/tide_ocean Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/geophysical/tide_pole Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track Group\n",
      "/gt1r/land_ice_segments/ground_track/ref_azimuth Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/ref_coelv Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/seg_azimuth Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/sigma_geo_at Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/sigma_geo_r Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/sigma_geo_xt Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/x_atc Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/ground_track/y_atc Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/h_li Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/h_li_sigma Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/latitude Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/longitude Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/segment_id Dataset {5678/Inf}\n",
      "/gt1r/land_ice_segments/sigma_geo_h Dataset {5678/Inf}\n",
      "/gt1r/residual_histogram Group\n",
      "/gt1r/residual_histogram/bckgrd_per_m Dataset {567/Inf}\n",
      "/gt1r/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt1r/residual_histogram/count Dataset {567/Inf, 748}\n",
      "/gt1r/residual_histogram/delta_time Dataset {567/Inf}\n",
      "/gt1r/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt1r/residual_histogram/lat_mean Dataset {567/Inf}\n",
      "/gt1r/residual_histogram/lon_mean Dataset {567/Inf}\n",
      "/gt1r/residual_histogram/pulse_count Dataset {567/Inf}\n",
      "/gt1r/residual_histogram/segment_id_list Dataset {567/Inf, 10}\n",
      "/gt1r/residual_histogram/x_atc_mean Dataset {567/Inf}\n",
      "/gt1r/segment_quality    Group\n",
      "/gt1r/segment_quality/delta_time Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/record_number Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/reference_pt_lat Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/reference_pt_lon Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/segment_id Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/signal_selection_source Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/signal_selection_status Group\n",
      "/gt1r/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5678/Inf}\n",
      "/gt1r/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5678/Inf}\n",
      "/gt2l                    Group\n",
      "/gt2l/land_ice_segments  Group\n",
      "/gt2l/land_ice_segments/atl06_quality_summary Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction Group\n",
      "/gt2l/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/fpb_med_corr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/fpb_n_corr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/med_r_fit Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/tx_mean_corr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/bias_correction/tx_med_corr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/delta_time Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/dem Group\n",
      "/gt2l/land_ice_segments/dem/dem_flag Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/dem/dem_h Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/dem/geoid_h Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics Group\n",
      "/gt2l/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/h_expected_rms Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/h_mean Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/n_fit_photons Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/signal_selection_source Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/snr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/snr_significance Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical Group\n",
      "/gt2l/land_ice_segments/geophysical/bckgrd Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/bsnow_conf Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/bsnow_h Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/bsnow_od Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/cloud_flg_asr Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/cloud_flg_atm Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/dac Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/e_bckgrd Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/layer_flag Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/msw_flag Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/neutat_delay_total Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/r_eff Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/solar_azimuth Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/solar_elevation Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/tide_earth Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/tide_equilibrium Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/tide_load Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/tide_ocean Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/geophysical/tide_pole Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track Group\n",
      "/gt2l/land_ice_segments/ground_track/ref_azimuth Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/ref_coelv Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/seg_azimuth Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/sigma_geo_at Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/sigma_geo_r Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/sigma_geo_xt Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/x_atc Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/ground_track/y_atc Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/h_li Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/h_li_sigma Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/latitude Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/longitude Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/segment_id Dataset {5681/Inf}\n",
      "/gt2l/land_ice_segments/sigma_geo_h Dataset {5681/Inf}\n",
      "/gt2l/residual_histogram Group\n",
      "/gt2l/residual_histogram/bckgrd_per_m Dataset {568/Inf}\n",
      "/gt2l/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt2l/residual_histogram/count Dataset {568/Inf, 748}\n",
      "/gt2l/residual_histogram/delta_time Dataset {568/Inf}\n",
      "/gt2l/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt2l/residual_histogram/lat_mean Dataset {568/Inf}\n",
      "/gt2l/residual_histogram/lon_mean Dataset {568/Inf}\n",
      "/gt2l/residual_histogram/pulse_count Dataset {568/Inf}\n",
      "/gt2l/residual_histogram/segment_id_list Dataset {568/Inf, 10}\n",
      "/gt2l/residual_histogram/x_atc_mean Dataset {568/Inf}\n",
      "/gt2l/segment_quality    Group\n",
      "/gt2l/segment_quality/delta_time Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/record_number Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/reference_pt_lat Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/reference_pt_lon Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/segment_id Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/signal_selection_source Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/signal_selection_status Group\n",
      "/gt2l/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5681/Inf}\n",
      "/gt2l/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5681/Inf}\n",
      "/gt2r                    Group\n",
      "/gt2r/land_ice_segments  Group\n",
      "/gt2r/land_ice_segments/atl06_quality_summary Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction Group\n",
      "/gt2r/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/fpb_med_corr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/fpb_n_corr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/med_r_fit Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/tx_mean_corr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/bias_correction/tx_med_corr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/delta_time Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/dem Group\n",
      "/gt2r/land_ice_segments/dem/dem_flag Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/dem/dem_h Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/dem/geoid_h Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics Group\n",
      "/gt2r/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/h_expected_rms Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/h_mean Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/n_fit_photons Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/signal_selection_source Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/snr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/snr_significance Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical Group\n",
      "/gt2r/land_ice_segments/geophysical/bckgrd Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/bsnow_conf Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/bsnow_h Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/bsnow_od Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/cloud_flg_asr Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/cloud_flg_atm Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/dac Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/e_bckgrd Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/layer_flag Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/msw_flag Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/neutat_delay_total Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/r_eff Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/solar_azimuth Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/solar_elevation Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/tide_earth Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/tide_equilibrium Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/tide_load Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/tide_ocean Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/geophysical/tide_pole Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track Group\n",
      "/gt2r/land_ice_segments/ground_track/ref_azimuth Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/ref_coelv Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/seg_azimuth Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/sigma_geo_at Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/sigma_geo_r Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/sigma_geo_xt Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/x_atc Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/ground_track/y_atc Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/h_li Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/h_li_sigma Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/latitude Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/longitude Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/segment_id Dataset {5682/Inf}\n",
      "/gt2r/land_ice_segments/sigma_geo_h Dataset {5682/Inf}\n",
      "/gt2r/residual_histogram Group\n",
      "/gt2r/residual_histogram/bckgrd_per_m Dataset {567/Inf}\n",
      "/gt2r/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt2r/residual_histogram/count Dataset {567/Inf, 748}\n",
      "/gt2r/residual_histogram/delta_time Dataset {567/Inf}\n",
      "/gt2r/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt2r/residual_histogram/lat_mean Dataset {567/Inf}\n",
      "/gt2r/residual_histogram/lon_mean Dataset {567/Inf}\n",
      "/gt2r/residual_histogram/pulse_count Dataset {567/Inf}\n",
      "/gt2r/residual_histogram/segment_id_list Dataset {567/Inf, 10}\n",
      "/gt2r/residual_histogram/x_atc_mean Dataset {567/Inf}\n",
      "/gt2r/segment_quality    Group\n",
      "/gt2r/segment_quality/delta_time Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/record_number Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/reference_pt_lat Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/reference_pt_lon Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/segment_id Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/signal_selection_source Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/signal_selection_status Group\n",
      "/gt2r/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5682/Inf}\n",
      "/gt2r/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5682/Inf}\n",
      "/gt3l                    Group\n",
      "/gt3l/land_ice_segments  Group\n",
      "/gt3l/land_ice_segments/atl06_quality_summary Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction Group\n",
      "/gt3l/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/fpb_med_corr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/fpb_n_corr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/med_r_fit Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/tx_mean_corr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/bias_correction/tx_med_corr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/delta_time Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/dem Group\n",
      "/gt3l/land_ice_segments/dem/dem_flag Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/dem/dem_h Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/dem/geoid_h Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics Group\n",
      "/gt3l/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/h_expected_rms Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/h_mean Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/n_fit_photons Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/signal_selection_source Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/snr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/snr_significance Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical Group\n",
      "/gt3l/land_ice_segments/geophysical/bckgrd Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/bsnow_conf Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/bsnow_h Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/bsnow_od Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/cloud_flg_asr Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/cloud_flg_atm Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/dac Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/e_bckgrd Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/layer_flag Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/msw_flag Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/neutat_delay_total Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/r_eff Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/solar_azimuth Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/solar_elevation Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/tide_earth Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/tide_equilibrium Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/tide_load Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/tide_ocean Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/geophysical/tide_pole Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track Group\n",
      "/gt3l/land_ice_segments/ground_track/ref_azimuth Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/ref_coelv Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/seg_azimuth Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/sigma_geo_at Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/sigma_geo_r Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/sigma_geo_xt Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/x_atc Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/ground_track/y_atc Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/h_li Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/h_li_sigma Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/latitude Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/longitude Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/segment_id Dataset {5685/Inf}\n",
      "/gt3l/land_ice_segments/sigma_geo_h Dataset {5685/Inf}\n",
      "/gt3l/residual_histogram Group\n",
      "/gt3l/residual_histogram/bckgrd_per_m Dataset {568/Inf}\n",
      "/gt3l/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt3l/residual_histogram/count Dataset {568/Inf, 748}\n",
      "/gt3l/residual_histogram/delta_time Dataset {568/Inf}\n",
      "/gt3l/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt3l/residual_histogram/lat_mean Dataset {568/Inf}\n",
      "/gt3l/residual_histogram/lon_mean Dataset {568/Inf}\n",
      "/gt3l/residual_histogram/pulse_count Dataset {568/Inf}\n",
      "/gt3l/residual_histogram/segment_id_list Dataset {568/Inf, 10}\n",
      "/gt3l/residual_histogram/x_atc_mean Dataset {568/Inf}\n",
      "/gt3l/segment_quality    Group\n",
      "/gt3l/segment_quality/delta_time Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/record_number Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/reference_pt_lat Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/reference_pt_lon Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/segment_id Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/signal_selection_source Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/signal_selection_status Group\n",
      "/gt3l/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5685/Inf}\n",
      "/gt3l/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5685/Inf}\n",
      "/gt3r                    Group\n",
      "/gt3r/land_ice_segments  Group\n",
      "/gt3r/land_ice_segments/atl06_quality_summary Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction Group\n",
      "/gt3r/land_ice_segments/bias_correction/fpb_mean_corr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/fpb_mean_corr_sigma Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/fpb_med_corr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/fpb_med_corr_sigma Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/fpb_n_corr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/med_r_fit Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/tx_mean_corr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/bias_correction/tx_med_corr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/delta_time Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/dem Group\n",
      "/gt3r/land_ice_segments/dem/dem_flag Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/dem/dem_h Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/dem/geoid_h Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics Group\n",
      "/gt3r/land_ice_segments/fit_statistics/dh_fit_dx Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/dh_fit_dx_sigma Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/dh_fit_dy Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/h_expected_rms Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/h_mean Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/h_rms_misfit Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/h_robust_sprd Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/n_fit_photons Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/n_seg_pulses Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/sigma_h_mean Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/signal_selection_source Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/signal_selection_source_status Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/snr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/snr_significance Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/fit_statistics/w_surface_window_final Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical Group\n",
      "/gt3r/land_ice_segments/geophysical/bckgrd Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/bsnow_conf Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/bsnow_h Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/bsnow_od Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/cloud_flg_asr Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/cloud_flg_atm Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/dac Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/e_bckgrd Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/layer_flag Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/msw_flag Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/neutat_delay_total Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/r_eff Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/solar_azimuth Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/solar_elevation Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/tide_earth Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/tide_equilibrium Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/tide_load Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/tide_ocean Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/geophysical/tide_pole Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track Group\n",
      "/gt3r/land_ice_segments/ground_track/ref_azimuth Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/ref_coelv Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/seg_azimuth Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/sigma_geo_at Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/sigma_geo_r Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/sigma_geo_xt Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/x_atc Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/ground_track/y_atc Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/h_li Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/h_li_sigma Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/latitude Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/longitude Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/segment_id Dataset {5686/Inf}\n",
      "/gt3r/land_ice_segments/sigma_geo_h Dataset {5686/Inf}\n",
      "/gt3r/residual_histogram Group\n",
      "/gt3r/residual_histogram/bckgrd_per_m Dataset {568/Inf}\n",
      "/gt3r/residual_histogram/bin_top_h Dataset {748}\n",
      "/gt3r/residual_histogram/count Dataset {568/Inf, 748}\n",
      "/gt3r/residual_histogram/delta_time Dataset {568/Inf}\n",
      "/gt3r/residual_histogram/ds_segment_id Dataset {10}\n",
      "/gt3r/residual_histogram/lat_mean Dataset {568/Inf}\n",
      "/gt3r/residual_histogram/lon_mean Dataset {568/Inf}\n",
      "/gt3r/residual_histogram/pulse_count Dataset {568/Inf}\n",
      "/gt3r/residual_histogram/segment_id_list Dataset {568/Inf, 10}\n",
      "/gt3r/residual_histogram/x_atc_mean Dataset {568/Inf}\n",
      "/gt3r/segment_quality    Group\n",
      "/gt3r/segment_quality/delta_time Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/record_number Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/reference_pt_lat Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/reference_pt_lon Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/segment_id Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/signal_selection_source Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/signal_selection_status Group\n",
      "/gt3r/segment_quality/signal_selection_status/signal_selection_status_all Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/signal_selection_status/signal_selection_status_backup Dataset {5686/Inf}\n",
      "/gt3r/segment_quality/signal_selection_status/signal_selection_status_confident Dataset {5686/Inf}\n",
      "/orbit_info              Group\n",
      "/orbit_info/crossing_time Dataset {1/Inf}\n",
      "/orbit_info/cycle_number Dataset {1/Inf}\n",
      "/orbit_info/lan          Dataset {1/Inf}\n",
      "/orbit_info/orbit_number Dataset {1/Inf}\n",
      "/orbit_info/rgt          Dataset {1/Inf}\n",
      "/orbit_info/sc_orient    Dataset {1/Inf}\n",
      "/orbit_info/sc_orient_time Dataset {1/Inf}\n",
      "/quality_assessment      Group\n",
      "/quality_assessment/gt1l Group\n",
      "/quality_assessment/gt1l/delta_time Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/lat_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/lon_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/signal_selection_source_fraction_0 Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/signal_selection_source_fraction_1 Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/signal_selection_source_fraction_2 Dataset {243/Inf}\n",
      "/quality_assessment/gt1l/signal_selection_source_fraction_3 Dataset {243/Inf}\n",
      "/quality_assessment/gt1r Group\n",
      "/quality_assessment/gt1r/delta_time Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/lat_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/lon_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/signal_selection_source_fraction_0 Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/signal_selection_source_fraction_1 Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/signal_selection_source_fraction_2 Dataset {243/Inf}\n",
      "/quality_assessment/gt1r/signal_selection_source_fraction_3 Dataset {243/Inf}\n",
      "/quality_assessment/gt2l Group\n",
      "/quality_assessment/gt2l/delta_time Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/lat_mean Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/lon_mean Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/signal_selection_source_fraction_0 Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/signal_selection_source_fraction_1 Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/signal_selection_source_fraction_2 Dataset {242/Inf}\n",
      "/quality_assessment/gt2l/signal_selection_source_fraction_3 Dataset {242/Inf}\n",
      "/quality_assessment/gt2r Group\n",
      "/quality_assessment/gt2r/delta_time Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/lat_mean Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/lon_mean Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/signal_selection_source_fraction_0 Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/signal_selection_source_fraction_1 Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/signal_selection_source_fraction_2 Dataset {242/Inf}\n",
      "/quality_assessment/gt2r/signal_selection_source_fraction_3 Dataset {242/Inf}\n",
      "/quality_assessment/gt3l Group\n",
      "/quality_assessment/gt3l/delta_time Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/lat_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/lon_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/signal_selection_source_fraction_0 Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/signal_selection_source_fraction_1 Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/signal_selection_source_fraction_2 Dataset {243/Inf}\n",
      "/quality_assessment/gt3l/signal_selection_source_fraction_3 Dataset {243/Inf}\n",
      "/quality_assessment/gt3r Group\n",
      "/quality_assessment/gt3r/delta_time Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/lat_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/lon_mean Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/signal_selection_source_fraction_0 Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/signal_selection_source_fraction_1 Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/signal_selection_source_fraction_2 Dataset {243/Inf}\n",
      "/quality_assessment/gt3r/signal_selection_source_fraction_3 Dataset {243/Inf}\n",
      "/quality_assessment/qa_granule_fail_reason Dataset {1}\n",
      "/quality_assessment/qa_granule_pass_fail Dataset {1}\n"
     ]
    }
   ],
   "source": [
    "!h5ls -r /home/jovyan/shared/surface_velocity/FIS_ATL06_small/processed_ATL06_20191129105346_09700511_003_01.h5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1450950 1450951 1450952 ... 1456628 1456629 1456630]\n"
     ]
    }
   ],
   "source": [
    "with h5py.File(datapath, 'r') as f:\n",
    "    segment_id = f['/gt2l/land_ice_segments/segment_id'][:]\n",
    "print(segment_id)\n",
    "# /gt2l/land_ice_segments/segment_id"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "def atl06_to_dict(filename, beam, field_dict=None, index=None, epsg=None):\n",
    "    \"\"\"\n",
    "        Read selected datasets from an ATL06 file\n",
    "\n",
    "        Input arguments:\n",
    "            filename: ATl06 file to read\n",
    "            beam: a string specifying which beam is to be read (ex: gt1l, gt1r, gt2l, etc)\n",
    "            field_dict: A dictinary describing the fields to be read\n",
    "                    keys give the group names to be read, \n",
    "                    entries are lists of datasets within the groups\n",
    "            index: which entries in each field to read\n",
    "            epsg: an EPSG code specifying a projection (see www.epsg.org).  Good choices are:\n",
    "                for Greenland, 3413 (polar stereographic projection, with Greenland along the Y axis)\n",
    "                for Antarctica, 3031 (polar stereographic projection, centered on the Pouth Pole)\n",
    "        Output argument:\n",
    "            D6: dictionary containing ATL06 data.  Each dataset in \n",
    "                dataset_dict has its own entry in D6.  Each dataset \n",
    "                in D6 contains a numpy array containing the \n",
    "                data\n",
    "    \"\"\"\n",
    "    if field_dict is None:\n",
    "        field_dict={None:['latitude','longitude','h_li', 'atl06_quality_summary'],\\\n",
    "                    'ground_track':['x_atc','y_atc'],\\\n",
    "                    'fit_statistics':['dh_fit_dx', 'dh_fit_dy']}\n",
    "    D={}\n",
    "    file_re=re.compile('ATL06_(?P<date>\\d+)_(?P<rgt>\\d\\d\\d\\d)(?P<cycle>\\d\\d)(?P<region>\\d\\d)_(?P<release>\\d\\d\\d)_(?P<version>\\d\\d).h5')\n",
    "    with h5py.File(filename,'r') as h5f:\n",
    "        for key in field_dict:\n",
    "            for ds in field_dict[key]:\n",
    "                if key is not None:\n",
    "                    ds_name=beam+'/land_ice_segments/'+key+'/'+ds\n",
    "                else:\n",
    "                    ds_name=beam+'/land_ice_segments/'+ds\n",
    "                if index is not None:\n",
    "                    D[ds]=np.array(h5f[ds_name][index])\n",
    "                else:\n",
    "                    D[ds]=np.array(h5f[ds_name])\n",
    "                if '_FillValue' in h5f[ds_name].attrs:\n",
    "                    bad_vals=D[ds]==h5f[ds_name].attrs['_FillValue']\n",
    "                    D[ds]=D[ds].astype(float)\n",
    "                    D[ds][bad_vals]=np.NaN\n",
    "        D['data_start_utc'] = h5f['/ancillary_data/data_start_utc'][:]\n",
    "        D['delta_time'] = h5f['/gt2l/land_ice_segments/delta_time'][:]\n",
    "\n",
    "    if epsg is not None:\n",
    "        xy=np.array(pyproj.proj.Proj(epsg)(D['longitude'], D['latitude']))\n",
    "        D['x']=xy[0,:].reshape(D['latitude'].shape)\n",
    "        D['y']=xy[1,:].reshape(D['latitude'].shape)\n",
    "    temp=file_re.search(filename)\n",
    "    D['rgt']=int(temp['rgt'])\n",
    "    D['cycle']=int(temp['cycle'])\n",
    "    D['beam']=beam\n",
    "    return D"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "ATL06_track = atl06_to_dict(datapath, 'gt2l', epsg=3031)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['latitude', 'longitude', 'h_li', 'atl06_quality_summary', 'x_atc', 'y_atc', 'dh_fit_dx', 'dh_fit_dy', 'data_start_utc', 'x', 'y', 'rgt', 'cycle', 'beam'])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ATL06_track.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[60260046.62119763 60260046.6240197  60260046.62684182 ...\n",
      " 60260062.62573686 60260062.62856199 60260062.63138753]\n",
      "[b'2019-11-29T10:53:45.845255Z']\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7f7f7adc5090>]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEFCAYAAAAYKqc0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3deZQU1fnG8e87DKvswuCAIqIg4AoCisoii7IkMerRuCQ/NAti3DUqCBoVFzQxmk2NiYiJRqNo1CgoiAGNsg2rgICgyM4Mi6wOzPL+/uiinWF6Bmat7p7nc46nq25Vd78yxTOXW1W3zN0REZHkkhJ2ASIiUvEU7iIiSUjhLiKShBTuIiJJSOEuIpKEUsMuAKBZs2bepk2bsMsQEUkoc+fO3eLuzWNti4twb9OmDRkZGWGXISKSUMzs6+K2aVhGRCQJKdxFRJKQwl1EJAkp3EVEkpDCXUQkCSncRUSSkMJdRCQJKdxFREKwd38u/X83nclLNlXK5yvcRUSq2Ecrsuh07/uszNzN45NXVMp3KNxFRKpQdk4e/zdudnR9/E+7Vcr3xMX0AyIi1UWHe96LLq8eO6TSvkc9dxGRKjJh7rro8rIxAyv1uw7ZczezccD3gEx3Pzloawr8C2gDrAYuc/ftZtYG+BxYHrx9prsPr/CqRUQSxJ59ufR9fBqbd+6Ltr308zOpU7NGpX7v4fTcxwMH/4oZAUx193bA1GD9gFXufnrwn4JdRKoNd+edRRvIzskDIuPrJ/36/ULBfnKrhpxzQrNKr+WQPXd3/yjokRd0IdAnWH4BmAbcVYF1iYgknB/9ZSazV28DYMWDgwqNr/ftkMZzQ7tiZlVSS1nH3Fu4+0aA4DWtwLbjzGy+mU03s57FfYCZDTOzDDPLyMrKKmMZIiLxYdOO7GiwA7QfPSm6fNfADoy7uluVBTtU/AnVjUBrd+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k7DsUqOdy4OXDLV6XQoqIJCH13EVEkpDCXUQkCSncRUSSkMJdRCQJKdxFRJKQwl1EJAkp3EVEktD/A1Io0ImzTmnIAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "print(ATL06_track['delta_time'])\n",
    "print(ATL06_track['data_start_utc'])\n",
    "\n",
    "plt.plot(ATL06_track['delta_time'], ATL06_track['h_li'])\n",
    "# plt.scatter(ATL06_track['x'],ATL06_track['y'],1,ATL06_track['h_li'])\n",
    "# plt.colorbar()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Try fittopo.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "module 'datetime' has no attribute 'strptime'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-48-000572a94ec6>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0mtimevector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mATL06_track\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'delta_time'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mATL06_track\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'delta_time'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mt0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstrptime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mATL06_track\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'data_start_utc'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m: module 'datetime' has no attribute 'strptime'"
     ]
    }
   ],
   "source": [
    "timevector = ATL06_track['delta_time'] - ATL06_track['delta_time'][0]\n",
    "import datetime\n",
    "# logic: turn into decimal years, somehow"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "usage: fittopo.py [-h] [-d dx dy] [-r radius] [-q n_reloc] [-i n_iter]\n",
      "                  [-z min_obs] [-m mod_lim] [-k mod_order] [-t ref_time]\n",
      "                  [-j epsg_num] [-v x y t h] [-x expr] [-n n_jobs]\n",
      "                  [-s slope_lim] [-p]\n",
      "                  file [file ...]\n",
      "\n",
      "Compute surface elevation residuals from satellite/airborne altimetry.\n",
      "\n",
      "positional arguments:\n",
      "  file          file(s) to process (HDF5)\n",
      "\n",
      "optional arguments:\n",
      "  -h, --help    show this help message and exit\n",
      "  -d dx dy      spatial resolution for grid-solution (deg or km)\n",
      "  -r radius     min and max search radius (km)\n",
      "  -q n_reloc    number of relocations for search radius\n",
      "  -i n_iter     maximum number of iterations for model solution\n",
      "  -z min_obs    minimum obs to compute solution\n",
      "  -m mod_lim    minimum obs for higher order models\n",
      "  -k mod_order  order of the surface fit model: 1=lin or 2=quad\n",
      "  -t ref_time   time to reference the solution to: year|fixed|variable\n",
      "  -j epsg_num   projection: EPSG number (AnIS=3031, GrIS=3413)\n",
      "  -v x y t h    name of lon/lat/t/h in the HDF5\n",
      "  -x expr       expression to apply to time (e.g. 't + 2000'), optional\n",
      "  -n n_jobs     for parallel processing of multiple tiles, optional\n",
      "  -s slope_lim  slope limit for x/y direction (deg)\n",
      "  -p            print diagnostic information to terminal\n"
     ]
    }
   ],
   "source": [
    "!python fittopo.py -h"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "t_year is decimal years"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!python ./fittopo.py /home/jovyan/shared/surface_velocity/FIS_ATL06_small/processed_ATL06_20191129105346_09700511_003_01.h5 -d 1 1 -r 1.0 -q 3 -i 5 -z 10 -m 100 \\\n",
    "-k 2 -t 2020 -j 3031 -v lon lat t_year h_li -s 10 -p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "970"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
